<?php
/* 
 * Copyright (c) 2018-2021   All rights reserved.
 * 
 * 创建时间：2021-08-30 17:27
 *
 * 项目：rm  -  $  - index.php
 *
 * 作者：liwei 
 */


?>


<div class="page pay-my-index">
    <div class="navbar navbar-bgcolor-red">
        <div class="navbar-inner">
            <div class="left">
                <a class="link icon-only" href="javascript:window.history.back();">
                    <svg class="icon"><use xlink:href="#fa-back"></use></svg>
                </a>
            </div>
            <div class="title buttons-row">
                <?php foreach ($myScores as $scoreid => $v): ?>
                    <span class="doscore-box sc-<?=$scoreid?>" title="<?=$v['title']?>">
                    <?=\lev\helpers\ScoreHelper::svgScoreIcon($scoreid)?>
                    <numv num="<?=$v['score']?>"><?=Lev::formatNumber($v['score'])?></numv>
                </span>
                <?php endforeach;?>
            </div>
            <div class="right">
                <a class="link icon-only" href="<?php echo Lev::toReRoute(['/'])?>" target="_top">
                    <svg class="icon"><use xlink:href="#fa-home"></use></svg>
                </a>
            </div>
            <!--导航-->
            <div class="subnavbar nav-links">
                <div class="data-table tabBtnBox">
                    <?php if (!empty($subnavs)) foreach ($subnavs as $v):?>
                        <a class="tab-link tabBtn_<?=$v['id']?>" data-tab=".tab-<?=$v['id']?>" data-url="<?=$v['url']?>">
                            <stn>
                                <?=$v['name']?>
                            </stn>
                        </a>
                    <?php endforeach;?>
                </div>
            </div>

        </div>

    </div>

    <div class="tabs-swipeable-wrap appbg">

        <div class="preloader preloader-black initLoader" style="margin:80px auto;display: flex;"></div>
        <div class="tabs mbTabsBox hiddenx" data-tabId="<?=$deTabId?>">
            <?php
            foreach ($subnavs as $v) {
                is_file($file = __DIR__ . '/_tabs/' . ($v['tab'] ?: 'common') . '.php') && include $file;
            }
            ?>
        </div>
    </div>

<div class="LoadPageAjaxJS hiddenx">
<script>
    (function () {
        'use strict';

        jQuery(function () {
            Levme.onClick('.checkedTrade', function () {
                var obj = this;
                var opid = jQuery(obj).data('opid');
                Levme.ajaxv.getv(levToRoute('<?=Lev::toReRoute(['my/trade-check'])?>', {opid:opid}), function (data, status) {
                    status >0 && jQuery(obj).addClass('disabled');
                });
            });
            Levme.onClick('.setTradestatus4', function () {
                var obj = this;
                myApp.confirm('您确定要放弃支付订单吗？', function () {
                    var opid = jQuery(obj).data('opid');
                    Levme.ajaxv.getv(levToRoute('<?=Lev::toReRoute(['my/trade-status'])?>', {opid:opid}), function (data, status) {
                        status >0 && jQuery(obj).addClass('disabled');
                    });
                });
            })
        });
    })();
</script>
</div>
</div>


<script>
    jQuery(function () {
        Levme.tabs.tabShow.init();
        Levme.scrollLoad.init();
    });
</script>

